﻿Public Class REstadoTechoPropio

    Public Shared Function SeleccionarTodo(ByVal descEmpresa As String, ByVal DisplaySelect As Boolean) As List(Of EEstadoTechoPropio)
        Dim estadoTechoPropio As List(Of EEstadoTechoPropio) = Nothing

        Dim options As New TransactionOptions
        options.IsolationLevel = Transactions.IsolationLevel.ReadCommitted
        options.Timeout = New TimeSpan(0, 2, 0)

        Using scope As New TransactionScope(TransactionScopeOption.Required, options)
            Try
                estadoTechoPropio = DEstadoTechoPropio.SeleccionarTodo(descEmpresa)
                If estadoTechoPropio Is Nothing Then estadoTechoPropio = New List(Of EEstadoTechoPropio)
                If DisplaySelect Then estadoTechoPropio.Insert(0, New EEstadoTechoPropio("00", "-- SELECCIONAR --"))
                scope.Complete()
            Catch ex As Exception
                Throw
            End Try
        End Using

        Return estadoTechoPropio
    End Function

End Class
